package com.aoyebobi;

import java.awt.*;

/**
 * @Description
 * @Author aoyebobi
 * @Date 2024-09-04
 */

public class FirstFrameDemo {

    public static void main(String[] args) {
        Frame fr = new Frame("Hello");
        fr.setSize(240,240);
        fr.setBackground(Color.GREEN);
        //取消默认布局BorderLayout
        fr.setLayout(null);
        Panel panel = new Panel();
        panel.setSize(100,100);
        panel.setBackground(Color.YELLOW);
        fr.add(panel);
        fr.setVisible(true);

    }
}
